IBM Books

Software User's Guide Version 3.4


The OPCON Process and Commands

This chapter describes the OPCON interface configuration and operational commands. It includes the following sections:


What is the OPCON Process?

The Operator Console process (OPCON) is the root-level process of the device software user interface. The main function of OPCON is to communicate with processes at the secondary level, such as Configuration, Console, and Event Logging. Using OPCON commands, you may also:


Accessing the OPCON Process

When the device starts for the first time, a boot message appears on the console. Then the OPCON prompt (*) appears on the console, indicating that the OPCON process is active and ready to accept commands.

The OPCON process allows you to configure, change, and monitor all of the device's operating parameters. While in the OPCON process, the device is forwarding data traffic. When the device is booted and enters OPCON, a copyright logo and an asterisk (*) prompt appears on the locally attached console terminal. This is the OPCON (OPerator's CONsole) prompt, the main user interface that allows access to second-level processes.

Some changes to the device's operating parameters made while in OPCON take effect immediately without requiring reinitializing of the device. If the changes do not take effect, use the reload command at the * prompt.

At the * prompt, an extensive set of commands enables you to check the status of various internal software processes, monitor the performance of the device's interfaces and packet forwarders, and configure various operational parameters.


OPCON Commands

This section describes the OPCON commands. Commands that are needed more often appear before the "- - - - -" separator. Each command includes a description, syntax requirements, and an example. The OPCON commands are summarized in Table 4. To use them, access the OPCON process and enter the appropriate command at the OPCON prompt (*).

Table 4. OPCON Commands
 Command   Function 
? (Help) Displays all the commands available for this command level or lists the options for specific commands (if available). See "Getting Help".
 Configuration*   Accesses the device's configuration process. (talk 6
 Console*   Accesses the device's console process. (talk 5
 Event Logging System*   Accesses the device's event logging process. (talk 2
 ELS Console*   Accesses the device's secondary ELS Console process. (talk 7
 Logout   Logs off a remote console. 
 Ping   Pings a specified IP address. 
 Reload   Reloads the device. 
 Telnet   Connects to another device. 
 - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 Diags   Displays device status and the contents of the hardware test log and the hardware error log. 
 Divert   Sends the output from a process to a console or other terminal. 
 Flush   Discards the output from a process. 
 Halt   Suspends the output from a process. 
 Intercept   Sets the OPCON default intercept character. 
 Memory   Reports the device's memory usage. 
 Status   Shows information about all device processes. 
 Suspend   Temporarily disables Command Completion for the current session only. 
 Talk   Connects to another device process and enables the use of its commands. 

* When you use this command for the first time, you will be reminded that you can use Ctrl-P to return to the MOS Operator Console prompt (*).

Configuration

Use the configuration command to access the device's configuration process (talk 6). See "The CONFIG Process (CONFIG - Talk 6) and Commands" for more information.

Syntax:

configuration
 

Example:

* configuration
 
(To return to the MOS Operator Console prompt (*), press Control-P)
 
Gateway user configuration
Config>

Console

Use the console command to access the device's console and monitoring process (talk 5). See "The Operating/Monitoring Process (GWCON - Talk 5) and Commands" for more information.

Syntax:

console
 

Example:

* console
 
CGW Operator Console
 
+

Diags

Use the diags command to display the Diagnostic Main Menu. The diagnostic menus allow you to enable, disable and test hardware adapters or ports. Diagnostic menus have on-screen help for the various options and status information that is available.

You can use the "b" (back) key to return to any previous menu. Use the "e" (exit) key to exit the diagnostics and return to the OPCON command prompt.

See the Service and Maintenance Manual for the 2216 for more information on diagnostic support.

Syntax:

diags
 

Divert

Use the divert command to send the output from a specified process to a specified terminal. This command allows you to divert the output of several processes to the same terminal to simultaneously view the output. The divert command is commonly used to redirect MONITR output messages to a specific terminal. The device allows only certain processes to be redirected.

The divert command requires the PID and tty# (number of the output terminal). To obtain these values, use the OPCON status command. The terminal number can be the number of either the local console (tty0) or one of the remote consoles (tty1, tty2). The following example shows Event Logging System messages generated by the MONITR process (2) being sent to a remote console tty1 (1).

Event messages are displayed immediately even though you may be in the middle of typing a command. The display and keyboard have separate buffers to prevent command confusion. The following example shows the MONITR process connected to TTY0 after executing the divert 2 0 command. If you want to stop the output, enter halt 2. The halt command is described in "Halt".

Syntax:

divert
pid tty#

Example:

Copyright Notices:
Copyright IBM Corp. 1994, 1997
MOS Operator Console
 
For help using the Command Line Interface, press ESCAPE, then '?'
 
 
* divert 2 0
 
* status
Pid  Name      Status TTY  Comments
1    COpCN1    IOW    TTY0 gzs
2    Monitr    IDL    TTY0
3    Tasker    RDY     --
4    MOSDBG    DET     --
5    CGWCon    DET     --
6    Config    DET     --
7    ELSCon    DET     --
8    ROpCN1    IDL    TTY1
9    ROpCN2    RDY    TTY2 jlg@128.185.40.40 

Els

Use the els command to access the device's secondary ELS console process, (talk 7). See "Accessing the Secondary ELS Console Process, ELSCon (Talk 7)" for more information.

Syntax:

els

Event

Use the event command to access the device's event logging process, (talk 2). See "Using the Event Logging System (ELS)" for more information.

Syntax:

event

Flush

Use the flush command to clear the output buffers of a process. This command is generally used before displaying the contents of the MONITR's FIFO buffer to prevent messages from scrolling off the screen. Accumulated messages are discarded.

The device allows only certain processes to be flushed. To obtain the PID and tty#, use the OPCON status command. In the following example, after executing the flush 2 command, the output of the MONITR process is sent to the Sink (it has been flushed).

Syntax:

flush
pid

Example:

* flush 2
* status
Pid  Name      Status TTY  Comments
1    COpCN1    IOW    TTY0 
2    Monitr    IDL    SNK
3    Tasker    RDY     --
4    MOSDBG    DET     --
5    CGWCon    DET     --
6    Config    DET     --
7    ELSCon    DET     --
8    ROpCN1    IDL    TTY1
9    ROpCN2    RDY    TTY2 jlg@128.185.40.40

Halt

Use the halt command to suspend all subsequent output from a specified process until the divert, flush, or talk OPCON command is issued to the process. The device cannot redirect all processes. Halt is the default state for output from a process. To obtain the PID for this command, use the OPCON status command. In the following example, after executing the halt 2 command, the MONITR process is no longer connected to TTY0. Event messages no longer appear.

Syntax:

halt
pid

Example:

* halt 2
* status
Pid  Name      Status TTY  Comments
1    COpCN1    IOW    TTY0 gzs
2    Monitr    IDL     --
3    Tasker    RDY     --
4    MOSDBG    DET     --
5    CGWCon    DET     --
6    Config    DET     --
7    ELSCon    DET     --
8    ROpCN1    IDL    TTY1
9    ROpCN2    RDY    TTY2 jlg@128.185.40.40

Intercept

Use the intercept command to change the OPCON intercept character. The intercept character is what you enter from other processes to get back to the OPCON process. The default intercept key combination is Ctrl-P.

The intercept character can be a control character. Enter the ^ (shift 6) character followed by the letter character or non-alphanumeric character, such as !@#$%, you want for the intercept character.
Note:This change applies to only the current login session.

Syntax:

intercept
^ character

Example 1:

* intercept ^a

From this example, the intercept character is now Ctrl-A.

Example 2:

* intercept !

From this example, the intercept character is now !.

Logout

Use the logout command to terminate the current session for the user who enters the logout command. If the console login is enabled, this command will require the next user to log in using an authorized userid/password combination. If the console login is not enabled, the OPCON prompt appears again.

Syntax:

logout
 

Memory

Use the memory command to obtain and display information about the device's global heap memory usage. The display helps you to determine if the device is being utilized efficiently. For an example of memory utilization, see Figure 3.

See Memory for memory usage via talk 5.

Syntax:

memory
 

Example:

* memory
Number of bytes:  Busy = 319544, Idle = 1936, Free = 1592

Busy
Specifies the number of bytes currently allocated.

Idle
Specifies the number of bytes previously allocated but freed and available for reuse.

Free
Specifies the number of bytes that were never allocated from the initial free storage area.
Note:The sum of the Idle and Free memory equals the total available heap memory.

Figure 3. Memory Utilization

  *---------------*           *----------------*         *----------------*
  |               |           |                |         |Free=1128       |
  |Free=1393515   |           |Free=103068     |         |----------------|
  |               |           |                |         |                |
  |               |           |----------------|         |Idle=103068     |
  |---------------|<*Water    |Idle=1128       |         |                |
  |Idle=1128      |  Mark     *----------------*         *----------------*
  *---------------*           |                |         |                |
  |               |           |                |         |                |
  |Busy=103068    |           |Busy=1393515    |         |Busy=1393515    |
  |               |           |                |         |                |
  *---------------*           *----------------*         *----------------*
   Under-Utilized              Properly Utilized          Over-Utilized

Ping

Use the ping command to have the device send ICMP Echo messages to a given destination (that is, "pinging") and watch for a response. This command can be used to isolate trouble in the internetwork.

Syntax:

ping
dest-addr [src-addr data-size ttl rate tos data-value]

The ping process is done continuously, incrementing the ICMP sequence number with each additional packet. Each matching received ICMP Echo response is reported with its sequence number and the round-trip time. The granularity (time resolution) of the round-trip time calculation is usually around 20 milliseconds, depending on the platform.

To stop the ping process, type any character at the console. At that time, a summary of packet loss, round-trip time, and number of unreachable ICMP destinations will be displayed.

When a broadcast or multicast address is given as destination, there may be multiple responses printed for each packet sent, one for each group member. Each returned response is displayed with the source address of the responder.

You can specify the size of the ping (number of data bytes in the ICMP message, excluding the ICMP header), value of the data, time-to-live (TTL) value, rate of pinging, and TOS bits to set. You can also specify the source IP address. If you do not specify the source IP address, the device uses its local address on the outgoing interface to the specified destination. If you are validating connectivity from any of the device's other interfaces to the destination, enter the IP address for that interface as the source address.

Only the destination parameter is required; all other parameters are optional. By default the size is 56 bytes, the TTL is 64, the rate is 1 ping per second, and the TOS setting is 0. The first 4 bytes of the ICMP data are used for a timestamp. By default the remaining data is a series of bytes with values that are incremented by 1, starting at X'04', and rolling over from X'FF' to X'00' (for example, X'04 05 06 07 . . . FC FD FE FF 00 01 02 03 . . .'). These values are incremented only when the default is used; if the data byte value is specified, all of the ICMP data (except for the first 4 bytes) is set to that value and that value is not incremented. For example, if you set the data byte value to X'FF', the ICMP data is a series of bytes with the value X'FF FF FF . . .'.

Example:

   * ping
   Destination IP address [0.0.0.0]? 192.9.200.1
   Source IP address [192.9.200.77]?
   Ping data size in bytes [56]?
   Ping TTL [64]?
   Ping rate in seconds [1]?
   Ping TOS (00-FF) [0]? e0
   Ping data byte value (00-FF) [ ]?
   PING 192.9.200.77-> 192.9.200.1:56 data bytes,ttl=64,every 1 sec.
   56 data bytes from 192.9.200.1:icmp_seq=0.ttl=255.time=0.ms
   56 data bytes from 192.9.200.1:icmp_seq=1.ttl=255.time=0.ms
   56 data bytes from 192.9.200.1:icmp_seq=2.ttl=255.time=0.ms
 
 
   ----192.9.200.1 PING Statistics----
   3 packets transmitted, 3 packets received, 0% packet loss
   round-trip min/avg/max=0/0/0 ms
 

Reload

Use the reload command to reboot the device by loading in a new copy of the device software.

When you use this command from a remote console, you install a new software load without going to the device. This command executes the same functions as pressing the reset button except that the device will not dump (if so configured). Before the reload takes effect, you are prompted to confirm the reload. You are also prompted if you have not saved the configuration changes.

Syntax:

reload
 

Example:

* reload
Are you sure you want to reload the gateway (Yes or No)?

Status

Use the status command to display information about all device processes. By entering the PID after the status command, you can look at the status of only the desired process. The following example shows the total status display.

Syntax:

status
pid

Example:

* status
 Pid  Name      Status TTY  Comments
 
1    COpCN1    IOW    TTY0
2    Monitr    IDL     --
3    Tasker    RDY     --
4    MOSDBG    DET     --
5    CGWCon    IOW     --
6    Config    IOW    TTY1
7    ELSCon    DET     --
8    ROpCN1    IOW    TTY1 128.185.46.101
9    ROpCN2    RDY    TTY2 128.185.46.104

Pid
Specifies the PID. This is the process to talk to from OPCON, or it can be an argument to the STATUS command to request status information about a specific process.

Name
Specifies the process name. It usually corresponds to the name of the program that is running in the process.

Status
Specifies one of the following:

IDL
Specifies that the process is idle and waiting for completion of some external event, such as asynchronous I/O.

RDY
Specifies that the process is ready to run and is waiting to use the CPU.

IOW
Specifies that the process is waiting for synchronous I/O, usually its expected standard input, to complete.

DET
Specifies that the process has output ready to be displayed and it is either waiting to be attached to a display console or waiting to have its output diverted to a specified console.

FZN
Specifies that the process is frozen due to an error. This usually means the process is trying to use a device which is faulty or incorrectly configured.

TTYn
Specifies the output terminal, if any, to which the process is currently connected.

TTY0
Local console

TTY1 or TTY2
Telnet consoles.

Sink
Process has been flushed.

Two dashes (--)
Process has been halted.

Comments
Specifies the user's login IP address provided during login when a user is logged in using Telnet (ROpCon).

Suspend

Use the suspend command to temporarily disable Command Completion for the current session only. If you are using an automated script, you can issue suspend yes as the first command if you want to temporarily disable Command Completion.

For information about Command Completion, see "Command Completion".

Syntax:

suspend
 

Talk

You can use the configuration, console, or event commands to connect to other processes, such as CONFIG, GWCON, or MONITR, or use the talk command. After connecting to a new process, you can send specific commands to and receive output from that process. You cannot talk to the TASKER or OPCON processes.

To obtain the PID, use the OPCON status command. Once you are connected to the second-level process, such as CONFIG, use the intercept character, Ctrl-P, to return to the * prompt.

Syntax:

talk
pid

Example:

* talk 5
 
CGW Operator Console
 
+

When using third-level processes, such as SNMP Config> or SNMP>, use the exit command to return to the second level.

Telnet

Use the telnet command to remotely attach to another device or to a remote host. The only optional parameter is the terminal type that you want to emulate.

You can use the telnet command with IPv4 or with IPv6 addresses.

A device has a maximum of five Telnet sessions: two servers (inbound to the device), and three clients (outbound from the device).
Note:To use Telnet in a pure bridging environment, enable Host Services.

Syntax:

telnet
ip-address terminal-type

Example 1: telnet 128.185.10.30 or telnet 128.185.10.30 23 or telnet 128.185.10.30 vt100

     Trying 128.185.10.30  ...
     Connected to 128.185.10.30
     Escape character is '^]'

Example 2: telnet 1:9::10

     Trying 1:9::10  ...
     Connected to 1:9::10
     Escape character is '^]'

When Telneting to a non-existent IP address, the device displays:

     Trying 128.185.10.30  ...

To enter the Telnet command mode, type the escape character-sequence, which is Ctrl-], at any prompt.

     telnet>

If you Telnet into a device,

The Telnet command mode consists of the following subcommands:

close
Close current connection

display
Display operating parameters

mode
Try to enter line-by-line or character-at-a-time mode

open
Connect to a site

quit
Exit Telnet

send
Transmit special characters (send ? for more)

set
Set operating parameters (set ? for more)

status
Print status information

toggle
Toggle operating parameters (toggle ? for more)

z
Suspend Telnet

?
Print help information

The status and send subcommands have one of two responses depending on whether or not the user is connected to another host. For example:

Connected to a host:
   telnet>    status


 
Connected to 128.185.10.30    Operating in character-at-a-time mode.    Escape character is ^].
 
   telnet>    send ayt
 

Note:The send command currently supports only ayt.

Not connected to a host:
   telnet>    status

 
   Need to be connected first.
 
   telnet>    send ayt
 
   Need to be connected first.

Use the close subcommand to close a connection to a remote host and terminate the Telnet session. Use the quit subcommand to exit the telnet command mode, close a connection, and terminate a Telnet session.

     telnet>    close

or

     telnet>    quit
 
     logout
     *


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]